home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr48
/
pasclern.zip
/
WHATSTRG.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-04-01
|
630b
|
24 lines
PROGRAM what_is_in_a_string;
VAR first_name : STRING[10];
initial : CHAR;
last_name : STRING[12];
full_name : STRING[25];
index,total : INTEGER;
BEGIN (* main program *)
first_name := 'John';
initial := 'Q';
last_name := 'Doe';
WRITELN(first_name,initial,last_name);
full_name := first_name + ' ' + initial + ' ' + last_name;
WRITELN(full_name);
total := length(full_name);
WRITELN('The string contains ',total:4,' characters');
FOR index := 1 TO length(full_name) DO
WRITELN(full_name[index]);
WRITELN('End of program');
END. (* main program *)